GetColourDialogPalette
ThisColour = GetColourDialogPalette(Index)
 
Parameters:

    Index = Index of the colour to read (0 to 15)
Returns:

    ThisColour = The RGB colour value
 

     The GetColourDialogPalette function retrieves an individual colour from the colour selection dialogs internal palette.



FACTS:


      * The GetColourDialogPalette expects colours in RGB format (24bit).




 
Example Source: Download This Example
; Include the Dialogs library in this program
  #Include "PBDialogs"
  
; Init the Colour Palette of the Colour Dialog
  For lp=0 To 16
     SetColourDialogColour(lp,RndRGB())
  Next
  
; Open the Colour Selection Dialog
  ThisColour=ColourDialog(RGB(255,255,255))
  
  If ThisColour<>-1
     
   ; Display message
     Text 0,0"Here's your colour"
     BoxC 0,20,50,70,true,ThisColour
     
     
     Text 0,90,"Colour Dialogs Palette"
     For lp=0 To 15
        
        X1=lp*50
        X2=X1+50
        y1= 120
        Y2=Y1+50
        BoxC x1,y1,x2,y2,true,GetColourDialogColour(lp)
        
     Next
     
     
  Else
     Print "You Pressed Cancel"
     
  EndIf
  
  
  // Display the screen & wait for a key press to end
  Sync
  WaitKey
  
  
  
  
  
  
 
Related Info: ColourDialog | FolderDialog | LoadDialog | SaveDialog | SetColourDialogPalette :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com